public class ThreadDemo8 {

    public static void main(String[] args) throws InterruptedException {
        Thread thread = new Thread(() -> {
            for (int i = 0; i < 3; i++) {
                System.out.println("hello t");
            }
//            Thread curT = Thread.currentThread();
//            System.out.println(curT.getName());
        });

        thread.start();
        thread.join();
        System.out.println("hello main");
//        Thread thread1 = Thread.currentThread();
//        System.out.println(thread1.getName());
    }
}
